<LINK REL="SHORTCUT ICON" HREF="../img/fm.ico"> 
<div class="header">
	<span id="text"><img src="../images/nguyendau.jpg"/></span>
	<span id="login">
		<?php if(Session::get('fullname') != null && Session::get('fullname') != ""){?>
			Xin chào<span style="color:blue">&nbsp;<img style="margin-bottom: -3px;" src="../css/images/user.png"/>&nbsp;<?php echo Session::get('fullname');?></span>
			| <a href="../index.php"><img style="margin-bottom: -3px;" src="../css/images/house_go.png"/>&nbsp;Trang chủ</a>
			| <a href="../login.html?action=logout"><img style="margin-bottom: -3px;" src="../css/images/stop.png"/>&nbsp;Thoát</a>
		<?php }else{?>
			<a href="login.html">Đăng nhập</a>
		<?php }?>
	</span>
</div>
<?php if(Session::get('fullname') != null && Session::get('fullname') != ""){?>
<?php
if(Session::get('isuser') == 0){
	$showMenus = $baseDAO->getUserMenus(Session::get('userid'), array("name", "url"));
}else{
	$showMenus = $baseDAO->getItems("menu", array("name", "url"), '', 'ORDER BY displayorder asc');
} 
?>
<div class="menu">
	<?php $isFirst = false; foreach ($showMenus as $showMenu){?>
		<?php if($isFirst){?>
			<span style="font-size:20px;color:#ADADAD;">&nbsp;|&nbsp;</span>
		<?php } $isFirst = true;?>
		<a href="../admin/<?php echo $showMenu['url'];?>"><?php echo $showMenu['name'];?></a>
	<?php }?>
</div>
<?php }?>
